package com.ymx.darling.type;

import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class DateHandler implements TypeHandler<Date> {
    @Override
    public Date getResult(ResultSet resultSet, int columIndex) throws SQLException {
        return resultSet.getDate(columIndex);
    }

    @Override
    public void setParameter(PreparedStatement statement, Date value, int index) throws SQLException {
        statement.setDate(index, value);
    }
}
